package com.demo.kotlin.network

import com.demo.kotlin.bean.base.BaseModel
import com.demo.kotlin.bean.user.TokenBean
import com.puhui.lib.http.retrofit.BaseServiceApi
import io.reactivex.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

interface CommonApiService : BaseServiceApi {

    companion object {
        const val SUCCESS_FLAG = "200"
        const val Base_Url = "https://www.discountuan.com/"
    }

    @FormUrlEncoded
    @POST("login")
    fun login(
        @Field("username") username: String,
        @Field("password") password: String
    ): Observable<BaseModel<TokenBean>>
}